package com.hoshiicloud.saleorder.feign.hystrix;

import com.hoshiicloud.common.rpc.Response;
import com.hoshiicloud.goods.entity.goods.GoodsSpecificationsValues;
import com.hoshiicloud.goods.entity.sku.ProductManage;
import com.hoshiicloud.goods.entity.spu.ExtSpu;
import com.hoshiicloud.goods.param.sku.ProductManageQueryParam;
import com.hoshiicloud.saleorder.dto.ExtSkuDTO;
import com.hoshiicloud.saleorder.dto.SkuDTO;
import com.hoshiicloud.saleorder.param.LockSkuStock;
import com.hoshiicloud.saleorder.feign.GoodsService;
import com.hoshiicloud.user.entity.customer.ExtSku;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;
import java.util.Map;

/**
 * @author zhangshuhu
 * @title: HystrixIdGeneratorFeignFallback
 * @projectName hoshiicloud-sku
 * @description:HystrixIdGeneratorFeignFallback
 * @since 2019-05-05
 */
public class HystrixGoodsFeignFallback implements GoodsService {

    @Override
    public Response<Map<Long, SkuDTO>> getSkuStockByIds(List<Long> ids) {
        return null;
    }

    @PostMapping("/goods/sku-info/queryHeadOfficeSkuStockByIds")
    @Override
    public Response<Map<Long, SkuDTO>> queryHeadOfficeSkuStockByIds(List<Long> ids) {
        return Response.failed("获取总店商品库存失败");
    }

    @Override
    public Response lockSkuStock(List<LockSkuStock> lockSkuStocks) {
        return null;
    }

    @Override
    public Response unLockSkuStock(List<LockSkuStock> lockSkuStocks) {
        return null;
    }

    @Override
    public Response<ExtSkuDTO> getExtSku(Long id) {
        return null;
    }

    @Override
    public Response<SkuDTO> getSkuInfoExtSku(Long id) {
        return null;
    }

    @Override
    public Response<List<ExtSku>> getGoodsDetailByIds(List<Long> param) {
        return null;
    }

    /**
     * 根据id获取扩展spu信息
     *
     * @param id 扩展spu主键
     * @return Response<ExtSpu>
     */
    @Override
    public Response<ExtSpu> getExtSpuById(Long id) {
        return Response.failed("获取扩展spu失败");
    }

    /**
     * 根据扩展SPU主键查找同一类扩展SPU
     *
     * @param id 扩展SPU主键id
     * @return Response<List < ExtSpu>>
     */
    @Override
    public Response<List<ExtSpu>> getSimilarExtSpuById(Long id) {
        return Response.failed("根据扩展SPU主键查找同一类扩展SPU失败");
    }

    @Override
    public Response<List<GoodsSpecificationsValues>> getSpecificationsValueToNameListBySpecId(Long specId) {
        return Response.failed("根据specId获取商品规格失败");
    }

    @Override
    public Response<List<ProductManage>> listProductManage(ProductManageQueryParam param) {
        return Response.failed("查询商品分配表失败");
    }
}
